/*******************************************************************************
 * Level Master 2000
 * Copyright (C) 2010 Christian Herzog
 * For more information see http://code.google.com/p/levelmaster2000/
 *
 * This file is licensed under the terms of the MIT license, see
 * http://www.opensource.org/licenses/mit-license.php for further information.
 ******************************************************************************/

//#ifndef SELECT_ENTITY_COMMAND_H
//#define SELECT_ENTITY_COMMAND_H
//
//#include <QUndoCommand>
//#include <QStringList>
//
//#include "../levelmaster2000.h"
//#include "../Entity.h"
//
////Command for selecting an entity.
//class SelectEntityCommand : public QUndoCommand
//{
//public:
//	SelectEntityCommand( LevelMaster2000* lm2k,
//                Entity* newValue,
//                Entity* oldValue,
//		QUndoCommand *parent = 0 )
//		: QUndoCommand( parent ),
//		lm2k( lm2k ),
//		newValue( newValue ),
//		oldValue( oldValue )
//	{
//	}
//
//	void undo()
//	{
//            //TODO: emit signals: add and remove entityToSelection.
//                //LevelMaster2000::DISALLOW_NEW_COMMAND++;
//		{
//                        //lm2k->sendSelectEntity( oldValue );
//                 //   lm2k->selectEntity( oldValue );
//                    lm2k->clearEntitySelection();
//                    lm2k->addEntityToSelection( oldValue );
//
//                    if(newValue)
//                    {
//                        setText( "Select Entity \"" + newValue->name + "\"" );
//                    }
//		}
//                //LevelMaster2000::DISALLOW_NEW_COMMAND--;
//	}
//
//	void redo()
//	{
//                //LevelMaster2000::DISALLOW_NEW_COMMAND++;
//		{
//                        //lm2k->sendSelectEntity( newValue );
//                   // lm2k->selectEntity( newValue );
//                    lm2k->clearEntitySelection();
//                    lm2k->addEntityToSelection( newValue );
//
//                    if(newValue)
//                    {
//                        setText( "Select Entity \"" + newValue->name + "\"" );
//                    }
//		}
//                //LevelMaster2000::DISALLOW_NEW_COMMAND--;
//	}
//
//private:
//	LevelMaster2000 *lm2k;
//        Entity* oldValue;
//        Entity* newValue;
//};
//
//#endif
